package utils

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

//整理请求数据
func Requests(ctx *gin.Context,check []string) (map[string]string)  {
	request_parms := make(map[string]string)
	for _,v := range check {
		v1,err := ctx.GetPostForm(v)
		if !err {
			ctx.JSON(http.StatusBadRequest,gin.H{"status":0,"msg":"参数错误"})
			return nil
		}
		request_parms[v] = v1
	}

	return request_parms
}
